import { formatTime } from '@/utils'
import i18n from '@/locales/index'
const { t } = i18n.global

export const columns = [
  { title: t('common.date'), dataIndex: 'createTime', key: 'createTime', align: 'center', width: 120, timeType: 'day',
    customRender: ({ text }) => {
      return formatTime(text, 'YYYY-MM-DD')
    } 
  },
  { title: t('hangManage.makeNo'), dataIndex: 'moNo', key: 'moNo', align: 'center', width: 120 },
  { title: t('basicData.styleNo'), dataIndex: 'styleNo', key: 'styleNo', align: 'center', width: 120 },
  { title: t('basicData.productType'), dataIndex: 'productType', key: 'productType', align: 'center', width: 120 },
  { title: t('basicData.orderNo'), dataIndex: 'orderNo', key: 'orderNo', align: 'center', width: 120 },
  { title: t('basicData.color'), dataIndex: 'color', key: 'color', align: 'center', width: 120 },
  { title: t('basicData.size'), dataIndex: 'size', key: 'size', align: 'center', width: 120 },
  { title: t('hangManage.poNo'), dataIndex: 'poNo', key: 'poNo', align: 'center', width: 120 },
  { title: t('other.HangerNo'), dataIndex: 'coatHangerNo', key: 'coatHangerNo', align: 'center', width: 120 },
  { title: t('basicData.section'), dataIndex: 'section', key: 'section', align: 'center', width: 120 },
  { title: t('basicData.processNo'), dataIndex: 'processNo', key: 'processNo', align: 'center', width: 120 },
  { title: t('basicData.processCodes'), dataIndex: 'processCode', key: 'processCode', align: 'center', width: 120 },
  { title: t('other.packages'), dataIndex: 'quantity', key: 'quantity', align: 'center', width: 120 },
  { title: t('basicData.group'), dataIndex: 'group', key: 'group', align: 'center', width: 120 },
  { title: t('hangManage.stationNo'), dataIndex: 'stationNo', key: 'stationNo', align: 'center', width: 120 },
  { title: t('basicData.jobNo'), dataIndex: 'staffNo', key: 'staffNo', align: 'center', width: 120 },
  { title: t('basicData.name'), dataIndex: 'staffName', key: 'staffName', align: 'center', width: 120 },
  { title: t('other.frontTime'), dataIndex: 'preCoatHangerFinishTime', key: 'preCoatHangerFinishTime', align: 'center', width: 140, timeType: 'time',
    customRender: ({ text }) => {
      return formatTime(text, 'YYYY-MM-DD HH:mm:ss')
    }
  },
  { title: t('other.hangerStartTime'), dataIndex: 'coatHangerStartTime', key: 'coatHangerStartTime', align: 'center', width: 140, timeType: 'time',
    customRender: ({ text }) => {
      return formatTime(text, 'YYYY-MM-DD HH:mm:ss')
    }
  },
  { title: t('other.hangerEndTime'), dataIndex: 'coatHangerEndTime', key: 'coatHangerEndTime', align: 'center', width: 140, timeType: 'time',
    customRender: ({ text }) => {
      return formatTime(text, 'YYYY-MM-DD HH:mm:ss')
    }
  },
  { title: t('basicData.standardTimeSec'), dataIndex: 'standardSeconds', key: 'standardSeconds', align: 'center', width: 120 },
  { title: t('other.workTime'), dataIndex: 'workTime', key: 'workTime', align: 'center', width: 120 },
  { title: t('other.laborRatio'), dataIndex: 'workEfficiency', key: 'workEfficiency', align: 'center', width: 120 },
  
]